<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="decorator" content="default"/>
 
	<title>修改设备维修信息</title>	
	
	<script type="text/javascript">	
		$(document).ready(function() {
			
		});
				
		 
		
		$(function(){
		
		//取消功能
			$("#cancelBtn").click(function(){
			 	window.parent.location.reload(); 
				var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
				parent.layer.close(index); //再执行关闭    
				
			});
			
		//保存功能	 
			$("#confirmBtn").click(function(){
				var equipmentId = $("#equipmentId").val();
				if(equipmentId==null||equipmentId.trim()==""){
					$.jBox.tip("设备编号不能为空");
					
					return false;
				}
				
				window.parent.location.reload(); 
				var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
				parent.layer.close(index); //再执行关闭 
				
				
					//提交form edit by wangnan 2018-3-28
				var action="${ctx}/ccrepairdata/repairData/completeRepair" ; 
				$("#inputForm").attr('action',action);    //通过jquery为action属性赋值
       			$("#inputForm").submit();    //提交ID为myform的表单 
       			  
			});
		});
		
	</script>
	<style type="text/css">
		body{
			color: #000000;
		}
		#repairDateTh{
			border-bottom: 1px solid #ddd;
		}
	</style>
</head>
<body>
	<form id="inputForm" class ="inputForm"   method="post">
		
	<div class="breadcrumb">
		<table class="table table-bordered">
		<tr>
			<td><label>设备</label><span class="help-inline"><font color="red">*</font> </span></td>			
			<td>
				<span style="font-size:12px;">
					<input type="text" id="name" name="name" readonly="readonly" style="" size="10" maxlength="20" value="${name}"/>
				</span>	
			</td>	
			
			<td><label>设备编号</label><span class="help-inline"><font color="red">*</font> </span></td>
			<td>
				<span style="font-size:12px;">		  			
			 		<input type="text" id="equipmentId" name="equipmentId" required="true" readonly="readonly" style="" size="10" maxlength="20" value="${equipmentId}"/> 
				</span>
			</td>	
		</tr>
		<tr>
			<td><label></label></td>
			<td></td>	
			<td><label>损坏日期</label></td>
			<td>	
			<%--<input type="text" id="breakDownDate" name="breakDownDate" required="true" readonly="readonly" style="" size="10" maxlength="20" value="${breakDownDate}"/> --%> 	 
			<input type="datetime" id="breakDownDate" name="breakDownDate" style="" class="Wdate" value="${breakDownDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" /> 
			</td>			
		</tr>		
		<tr>
			<td><label>是否修复</label><span class="help-inline"><font color="red">*</font> </span></td>			
			
			<td>
				<span style="font-size:12px;">
					<select id = "isrepaired" name = "isrepaired" style="width: 220px;">  			  			
			 			<option value="否">否</option>  
			 			<option value="是">是</option>  			 					
					</select>  
				</span>	
			 </td>	
		 	<td><label>修复日期</label></td>
			<td id="repairDateTh"><input type="datetime" id="repairDate" name="repairDate" style="" class="Wdate" value="${repairDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />  
			</td>
		</tr>	
		<tr>
			<td><label>故障原因</label></td>
			<td><textarea cols="50" rows="5" id="cause"  name = "cause" style="width:250px;" >${cause}</textarea></td>	
			<td></td>
		
		</tr>
						
	</table>	
	</div>
	
	<div style="margin-right:20px; margin-bottom: 10px;">
		<button  id="confirmBtn" style="margin-top: 20px;margin-left: 500px;"  class="btn btn-primary">保存</button> 
		<button id = "cancelBtn" style="margin-top: 20px;margin-left: 20px;"  class="btn btn-default">取消</button>
	</div>
	</form>		
</body>
</html>
